package com.newbye.uis
{
	import flash.display.DisplayObjectContainer;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	
	import mx.core.UIComponent;

	public class ParentContaierFactory
	{
		/**
		 *  
		 * @param type
		 * @see ParentConainerType
		 * @return 
		 * 
		 */		
		public static function createParentContainer(type:String):DisplayObjectContainer
		{
			var contaner:DisplayObjectContainer;
			
			switch(type)
			{
				case ParentConainerType.SPRITE:
					contaner = new Sprite();
					break;
				case ParentConainerType.MOVIECLIP:
					contaner = new MovieClip();
					break;
				case ParentConainerType.UICOMPONENT:
					contaner = new UIComponent();
					break;
			}
			
			return contaner;
		}
	}
}